
classdef IS95ForwardLinkPowerControlStrategyImpl < cdmapc.IPowerControlStrategy
    
    properties (GetAccess = private, SetAccess = private)
        typicalFER = IS95Constants.TYPICAL_FER;
        typicalFERSmall = IS95Constants.TYPICAL_FER_SMALL;
        typicalFERBig = IS95Constants.TYPICAL_FER_BIG;
        typicalD = IS95Constants.TYPICAL_D;
        typicalU = IS95Constants.TYPICAL_U;
        typicalV = IS95Constants.TYPICAL_V;
        typicalFERMeasurementWindow = IS95Constants.TYPICAL_FER_MEASUREMENT_WINDOW;
        
        forwardLink
    end % properties
    
    methods (Access = public)
        
        %
        % Constructor
        %
        % FIXME Completar precondiciones
        %
        function [iS95ForwardLinkPowerControlStrategyImpl] = IS95ForwardLinkPowerControlStrategyImpl(forwardLink, typicalFER, typicalFERSmall, typicalFERBig, typicalD, typicalU, typicalV, typicalFERMeasurementWindow)
            if(nargin == 0)
                error('Debe proporcionarse el enlace donde controlar la potencia inyectada');
            elseif(~isa(forwardLink, 'cdmapc.IForwardLink'))
                error('El objeto forwardLink debe ser de tipo IForwardLink');
            else
                iS95ForwardLinkPowerControlStrategyImpl.forwardLink = forwardLink;
            end % if
            if(exist('typicalFER','var'))
                iS95ForwardLinkPowerControlStrategyImpl.typicalFER = typicalFER;
            end % if
            if(exist('typicalFERSmall','var'))
                iS95ForwardLinkPowerControlStrategyImpl.typicalFERSmall = typicalFERSmall;
            end % if
            if(exist('typicalFERBig','var'))
                iS95ForwardLinkPowerControlStrategyImpl.typicalFERBig = typicalFERBig;
            end % if
            if(exist('typicalD','var'))
                iS95ForwardLinkPowerControlStrategyImpl.typicalD = typicalD;
            end % if
            if(exist('typicalU','var'))
                iS95ForwardLinkPowerControlStrategyImpl.typicalU = typicalU;
            end % if
            if(exist('typicalV','var'))
                iS95ForwardLinkPowerControlStrategyImpl.typicalV = typicalV;
            end % if
            if(exist('typicalFERMeasurementWindow','var'))
                iS95ForwardLinkPowerControlStrategyImpl.typicalFERMeasurementWindow = typicalFERMeasurementWindow;
            end % if
        end % function
        
        %
        % Destructor
        %
        function [] = delete(this)
            this.typicalFER = 0;
            this.typicalFERSmall = 0;
            this.typicalFERBig = 0;
            this.typicalD = 0;
            this.typicalU = 0;
            this.typicalV = 0;
            this.typicalFERMeasurementWindow = 0;
        end % function
        
        function [] = applyStrategy(~)
            % FIXMEs
        end % function
        
    end % methods
    
end % classdef
